<#import "/freemarker/modeltype.ftl" as mt>
<div class="dataTables_title">
	<div class="dataTables_title_left">按钮注释</div>
	<div class="dataTables_title_right">
		<a class="btn btn-danger"><i class="icon-lock"></i> 屏蔽</a>
		<a class="btn btn-warning"><i class="icon-unlock"></i> 解除屏蔽</a>
		<a class="btn btn-success"><i class="icon-edit"></i> 编辑</a>
	</div>
</div>
<table class="table table-bordered animate2 fadeInUp">
	<thead>
	<tr>
		<th>名称</th>
		<th>编号</th>
		<th>联系电话</th>
		<th>地址</th>
		<th>邮箱号</th>
		<th>传真</th>
		<th>类型</th>
		<th>类别</th>
		<th>首要联系人</th>
<!-- 		<th>创建人</th> -->
		<th>创建时间</th>
		<th style="width: 50px;text-align: center;">操作</th>
	</tr>
	</thead>
	<tbody>
	<#list pageBean.resultList as ib>
	<tr class="ui-widget-content">
		<td>${(ib.name)!''}</td>
		<td>${(ib.sid)!''}</td>
		<td>${(ib.phone)!''}</td>
		<td>${(ib.address)!''}</td>
		<td>${(ib.email)!''}</td>
		<td>${(ib.fax)!''}</td>
		<td><#if ib.type = 1>供应商<#elseif ib.type = 2>客户<#elseif ib.type = 3>供应商/客户<#else>其他</#if></td>
		<td>${(ib.stn)!''}</td>
		<td><#if ib.itemList?? && ib.itemList?size gt 0 >
				<#list ib.itemList as item>
					<#if !item.dc>
					<#else>
					<a href="javascript:;" onclick="javascript: sys_load_handle('invBusiness-edit_${ib.code}'); return false;">${(item.name)!''}【${(item.phone)!''}】</a>
					</#if>
				</#list>
			</#if>
		</td>
<!-- 		<td>${(ib.cn)!''}</td> -->
		<td>${(ib.ct?string('yyyy-MM-dd HH:mm'))!''}</td>
		<td style="text-align: center;">
			<div id="tttttt" class="btn-group">
				<#if !ib.deleted>
				<a href="javascript:;" onclick="javascript: shield_invBusiness('${ib.code}', '${ib.name}');" data-toggle="tooltip" title="屏蔽" class="btn btn-xs btn-danger"><i class="icon-lock"></i></a>
				<#else>
				<a href="javascript:;" onclick="javascript: unshield_invBusiness('${ib.code}', '${ib.name}');" data-toggle="tooltip" title="解除屏蔽" class="btn btn-xs btn-warning"><i class="icon-unlock"></i></a>
				</#if>
				<a href="javascript:;" onclick="javascript: sys_load_handle('invBusiness-edit_${ib.code}');" data-toggle="tooltip" title="编辑" class="btn btn-xs btn-success"><i class="icon-edit"></i></a>
			</div>
		</td>
	</tr>
	</#list>
	</tbody>
</table>
<#import "/freemarker/pagination.ftl" as p>
<@p.pagination pageBean 'query_invBusiness'/>